Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Drawing
Imports System.Data
Imports System.Text
Imports System.Windows.Forms

Namespace C4F.DevKit.Telephony.Controls
	Public Partial Class DialPad
		Inherits UserControl
		#Region "Properties"

		<Browsable(True)> _
		Public Overloads Property Enabled() As Boolean
			Get
				Return groupBoxDialpad.Enabled
			End Get

			Set(ByVal value As Boolean)
				groupBoxDialpad.Enabled = value
			End Set
		End Property

		#End Region

		#Region "Delegates and Events"

		Public Delegate Sub DigitClickedEventHandler(ByVal buttonChar As Char)

		Public Event DigitClicked As DigitClickedEventHandler

		Public Event ClearButtonClicked As EventHandler

		Public Event BackButtonClicked As EventHandler

		#End Region

		#Region "Constructors"

		Public Sub New()
			InitializeComponent()
		End Sub

		#End Region

		#Region "Event Handlers"

		Private Sub btnOne_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnOne.Click
			RaiseEvent DigitClicked("1"c)
		End Sub

		Private Sub btnTwo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnTwo.Click
			RaiseEvent DigitClicked("2"c)
		End Sub

		Private Sub btnThree_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnThree.Click
			RaiseEvent DigitClicked("3"c)
		End Sub

		Private Sub btnFour_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnFour.Click
			RaiseEvent DigitClicked("4"c)
		End Sub

		Private Sub btnFive_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnFive.Click
			RaiseEvent DigitClicked("5"c)
		End Sub

		Private Sub btnSix_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSix.Click
			RaiseEvent DigitClicked("6"c)
		End Sub

		Private Sub btnSeven_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSeven.Click
			RaiseEvent DigitClicked("7"c)
		End Sub

		Private Sub btnEight_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnEight.Click
			RaiseEvent DigitClicked("8"c)
		End Sub

		Private Sub btnNine_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnNine.Click
			RaiseEvent DigitClicked("9"c)
		End Sub

		Private Sub btnZero_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnZero.Click
			RaiseEvent DigitClicked("0"c)
		End Sub

		Private Sub btnClearPhoneNumber_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnClearPhoneNumber.Click
			RaiseEvent ClearButtonClicked(Me, Nothing)
		End Sub

		Private Sub btnBack_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnBack.Click
			RaiseEvent BackButtonClicked(Me, Nothing)
		End Sub

		#End Region
	End Class
End Namespace
